package com.nobuyme.box.toy.manage;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.nobuyme.box.R;
import com.nobuyme.box.toy.ToyListFragment;
import com.pachong.android.baseuicomponent.activity.BaseActivity;

import butterknife.OnClick;

import static android.R.attr.data;

public class ReplaceGoodsActivity extends BaseActivity {
    private ToyListFragment.TestBean data;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        data = (ToyListFragment.TestBean) getIntent().getSerializableExtra("data");
        hideToolbar();

    }

    public static void start(Activity activity,ToyListFragment.TestBean data) {
        Intent intent = new Intent(activity, ReplaceGoodsActivity.class);
        intent.putExtra("data", data);
        activity.startActivity(intent);
    }

    @Override
    public View createDataView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.activity_replace_goods, null);
    }

    @OnClick({R.id.btn_replace_complete, R.id.btn_replace_cancel})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_replace_complete:
                finish();
                break;
            case R.id.btn_replace_cancel:
                finish();
                break;
        }
    }
}
